<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        /* 
            需求：将数组百年城字符串
         */
         const array1 = ['aa','bb','cc'];
     /*     
         const str = array1.toString()
         console.log(str)   //aa,bb,cc
         console.log(typeof str)    //string */

         //需求二：将array1转换为字符串，每个item通过 - 分割

        //  const str =  array1.join('-');
        //  const str =  array1.join('');
         const str =  array1.join();    //什么都不指定 等价于 toString()
         console.log(str)
    </script>
</head>
<body>
    
</body>
</html>